package com.ruoyi.hatha.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hatha.mapper.PHexiaojiluMapper;
import com.ruoyi.hatha.domain.PHexiaojilu;
import com.ruoyi.hatha.service.IPHexiaojiluService;

/**
 * 核销记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-02
 */
@Service
public class PHexiaojiluServiceImpl implements IPHexiaojiluService 
{
    @Autowired
    private PHexiaojiluMapper pHexiaojiluMapper;

    /**
     * 查询核销记录
     * 
     * @param id 核销记录主键
     * @return 核销记录
     */
    @Override
    public PHexiaojilu selectPHexiaojiluById(Long id)
    {
        return pHexiaojiluMapper.selectPHexiaojiluById(id);
    }

    /**
     * 查询核销记录列表
     * 
     * @param pHexiaojilu 核销记录
     * @return 核销记录
     */
    @Override
    public List<PHexiaojilu> selectPHexiaojiluList(PHexiaojilu pHexiaojilu)
    {
        return pHexiaojiluMapper.selectPHexiaojiluList(pHexiaojilu);
    }

    /**
     * 新增核销记录
     * 
     * @param pHexiaojilu 核销记录
     * @return 结果
     */
    @Override
    public int insertPHexiaojilu(PHexiaojilu pHexiaojilu)
    {
        pHexiaojilu.setCreateTime(DateUtils.getNowDate());
        return pHexiaojiluMapper.insertPHexiaojilu(pHexiaojilu);
    }

    /**
     * 修改核销记录
     * 
     * @param pHexiaojilu 核销记录
     * @return 结果
     */
    @Override
    public int updatePHexiaojilu(PHexiaojilu pHexiaojilu)
    {
        return pHexiaojiluMapper.updatePHexiaojilu(pHexiaojilu);
    }

    /**
     * 批量删除核销记录
     * 
     * @param ids 需要删除的核销记录主键
     * @return 结果
     */
    @Override
    public int deletePHexiaojiluByIds(Long[] ids)
    {
        return pHexiaojiluMapper.deletePHexiaojiluByIds(ids);
    }

    /**
     * 删除核销记录信息
     * 
     * @param id 核销记录主键
     * @return 结果
     */
    @Override
    public int deletePHexiaojiluById(Long id)
    {
        return pHexiaojiluMapper.deletePHexiaojiluById(id);
    }
}
